import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/Login.vue'
import Index from '../components/Index.vue'
import UserInfo from '../components/UserInfo.vue'
// import Prize from '../components/Prize.vue'
import Notice from '../components/Notice.vue'
import Test from '../components/Test.vue'
import Manager from '../components/Manager.vue'
import NoPermission from '../components/NoPermission.vue'
import Order from '../components/Order.vue'
import Reply from '../components/Reply.vue'
import Site from '../components/Site.vue'
import Company from '../components/Company.vue'
import Chat from '../components/Chat.vue'
import Test2 from '../components/Test2.vue'
import Test3 from '../components/Test3.vue'
import Waste from '../components/Waste.vue'
import Permission from '../components/Permission.vue'
import AdminOrder from '../components/AdminOrder.vue'
import SiteOrder from '../components/SiteOrder.vue'
import Statistics from '../components/Statistics.vue'
import ManagerAdmin from "../components/ManagerAdmin.vue";
import SiteInfo from '../components/SiteInfo.vue'
import WasteAdmin from '../components/WasteAdmin.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    },
    {
      path: '/test2',
      name: 'Test2',
      component: Test2
    },
    {
      path: '/test3',
      name: 'Test3',
      component: Test3
    },
    {
      path: '/noPermission',
      name: 'NoPermission',
      component: NoPermission
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [
        {
          path: '/userInfo',
          name: 'UserInfo',
          component: UserInfo,
        },
        {
          path: '/notice',
          name: 'Notice',
          component: Notice,
        },
        {
          path: '/order',
          name: 'Order',
          component: Order,
        },
        {
          path: '/manager',
          name: 'Manager',
          component: Manager
        },
        {
          path:'/managerAdmin',
          name: 'ManagerAdmin',
          component: ManagerAdmin
        },
        {
          path: '/site',
          name: 'Site',
          component: Site
        },
        {
          path: '/company',
          name: 'Company',
          component: Company
        },
        {
          path: '/chat',
          name: 'Chat',
          component: Chat
        },
        {
          path: '/adminOrder',
          name: "AdminOrder",
          component: AdminOrder
        },
        {
          path: '/reply',
          name: 'Reply',
          component: Reply
        },
        {
          path: '/siteOrder',
          name: 'SiteOrder',
          component: SiteOrder
        },
        {
          path: '/statistics',
          name: 'Statistics',
          component: Statistics
        },
        {
          path: '/waste',
          name: 'Waste',
          component: Waste
        },
        {
          path: '/wasteAdmin',
          name: 'WasteAdmin',
          component: WasteAdmin
        },
        {
          path: '/permission',
          name: '/Permission',
          component: Permission
        },
        {
          path: '/site-info',
          name: 'SiteInfo',
          component: SiteInfo,
          meta: {
            requiresAuth: true
          }
        }
      ]
    },
  ]
})
